In order to execute an e-learning package (i.e. create a StoredLearningSession onto it), Microsoft Learning Components needs to register the package. This process involves copying information from the package's manifest into various database tables for fast subsequent lookup. In the process, the package is assigned a PackageItemIdentifier, a 64-bit integer identifier that's unique within the LearningStore database.
However, other than copying information from the package manifest, MLC doesn't store the contents of a package when it's registered. Instead, MLC stores a location string which is used to locate the package as needed. What's contained in the location string? It depends on where the application has decided to store its packages. The way the application tells MLC how to map a package identifier to package contents is by providing MLC with a package store.
A package store is an instance of a class derived from PackageStore. MLC implements the following package store types:
| Package Store Class | Description | Location String Format |
| FileSystemPackageStore | When the application asks FileSystemPackageStore to register a package, FileSystemPackageStore copies the contents of the package, "unzipped", into a new subdirectory of an application-specified directory, and updates the PackageItem database table (and related table) with information about the package, including the name of the new subdirectory. | The location string is the name of the subdirectory (within the application-specified package store directory) containing the copy of the package. The subdirectory name is chosen by FileSystemPackageStore. |
| SharePointPackageStore | When the application asks SharePointPackageStore to register a package, the package must already be stored within a document library in SharePoint. SharePointPackageStore updates the PackageItem database table (and related table) so that it contains a reference to the package in the document library. | The location string contains five substrings, separated by underscores. The substrings contain the same information maintained by the SharePointFileLocation class. |
FileSystemPackageStore is useful for applications that want to implement playback of e-learning content that's not stored in SharePoint. For example, BasicWebPlayer (MLC sample code) uses FileSystemPackageStore to store files uploaded to it.
SharePointPackageStore is used by applications that store e-learning content in SharePoint. (It should not be a surprise that SharePoint Learning Kit uses SharePointPackageReader.) Although SharePointPackageStore does not store the master copy of a package, it does maintain a cached copy of the package—cached in a file system directory specified by the application—to improve performance. (Otherwise, each time any file within a package needed to be read, the package would need to be retrieved from SharePoint's database and "unzipped".) SharePoint's package cache can be controlled using SharePointCacheSettings, passed as a parameter to the SharePointPackageStore constructor.
In addition to using the package store types listed above, an application can create a custom package store implementation, by creating a class based on PackageStore.